/******************************************************************************
	File Name:
		UserAServer.cc
	Description:
		This server uses User A Message System to communicate with its client.
	History:
		PROGRAMMER		Date			Description			
		Hongqi,Wang		06/02/2009		Original

	Note:
	
******************************************************************************/

#include <UserAMessage.h>

void RxInputQueueCb ( IpmBuffer & Ipm )
	{
	switch ( ipm.UserType )
		{
		case UAMT_QUERY:
			ProcessQueryRequest ( Ipm.Data(), Ipm.Size() );
			break;
		case UAMT_UPDATE:
		...
		}
	}

void ProcessQueryRequest ( void * pData, UInt32 size )
	{
	UserAMessage msg;
	msg.Decode ( pData, size );
	
	if ( msg.HasData ( UAM_FIELD1_BIT ) == TRUE )
		{
		Use msg.data.Field1;
		}
		
	if ( msg.HasData ( UAM_FIELD3_BIT ) == TRUE )
		{
		Use msg.data.Field3;
		}
	}